package com.mxl.dao.channel.impl;

import org.hibernate.criterion.Restrictions;
import org.springframework.util.Assert;

import com.mxl.dao.channel.ChargeConfigDao;
import com.mxl.dao.channel.model.ChargeConfig;
import com.mxl.datebase.orm.hibernate.BaseDaoSupport;

public class ChargeConfigDaoImpl extends BaseDaoSupport<ChargeConfig, Long>
		implements ChargeConfigDao {

	public ChargeConfig queryByCode(String code, int interfaceType) {
		Assert.notNull(code,
				"query ChannelGatewayRelation code must be not null");
		return super.findUnique(Restrictions.eq("code", code), Restrictions.eq(
				"interfaceType", interfaceType), Restrictions.eq("status", 0));
	}

}
